
frames:
   .dw ms_player_idle_right
   .dw ms_player_idle_left
   .dw ms_player_idle_fwd
   .dw ms_player_idle_back
   .dw ms_player_jog_right_0
   .dw ms_player_jog_right_1
   .dw ms_player_jog_left_0
   .dw ms_player_jog_left_1
   .dw ms_player_jog_fwd_0
   .dw ms_player_jog_fwd_1
   .dw ms_player_jog_back_0
   .dw ms_player_jog_back_1
   .dw ms_player_pickup_fwd
framebase:
   .db lit
   .db PAD_STATE
   .db fetch
   .db dup
   .db lit
   .db PAD_UP
   .db andd
vmif +then
   .db drop
   .db lit
   .db $A
   .db lit
   .db $10
   .db exit
+then
   .db dup
   .db lit
   .db PAD_DOWN
   .db andd
vmif +then
   .db drop
   .db lit
   .db $8
   .db lit
   .db $10
   .db exit
+then
   .db dup
   .db lit
   .db PAD_LEFT
   .db andd
vmif +then
   .db drop
   .db lit
   .db $6
   .db lit
   .db $8
   .db exit
+then
   .db lit
   .db PAD_RIGHT
   .db andd
vmif +then
   .db lit
   .db $4
   .db lit
   .db $8
   .db exit
+then
   .db lit
   .db $0
   .db dup
   .db exit

playersprite:
   .db alit
   .dw frames
   .db call
   .dw framebase
   .db lit
   .db FRAMECNT
   .db fetch
   .db andd
vmif +then
   .db oneplus
+then
   .db twomul
   .db plusa
   .db fetchplus
   .db fetchplus
   .db exit

drawplayer:
   .db lit
   .db $0
   .db lit
   .db $90
   .db lit
   .db $20
   .db call
   .dw playersprite
   .db metaspr
   .db exit

script:
   jsr bytecode
   .db call
   .dw drawplayer
   .db end